<!-- Purpose: this allows a user to create a new event (submission) -->
<h1>New score_submission for <%= @user_name %> </h1>

<%= error_messages_for :events_submitter %>

<p>
NOTE: for now, you must use pre-existing teams and leagues.  (Go to the 
<%= link_to 'Create Team', new_team_path %>
or
<%= link_to 'Create League', new_league_path %>
pages to create them first, if necessary.
</p>

<% form_for(@events_submitter) do |f| %>
  <p>
    <b>Event</b><br />
    &nbsp;<br />
    <%= text_field_tag :event, nil, :size => 50, :max_length => 50 %> (e.g. Rust Riot)
  </p>
  <table>
    <th></th>
    <tr>
    <td>&nbsp;</td>
    <th>Start and End Dates</th>
    <th>(and times, if possible)</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td><%= text_field_tag :start, nil, :size => 18, :max_length => 16 %> <!-- Enter the starting day of the event (mm/dd/yy [hh:mm [am|pm]]) --></td>
    <td><%= text_field_tag :end, nil, :size => 18, :max_length => 16 %> <!-- Enter the ending day of the event (mm/dd/yy [hh:mm [am|pm]]; can leave blank for same day) --></td>
    </tr>
  </table>
  <!-- game 1 of N -->
  <!-- game name (default to #{teamA} vs. #{teamB}) -->
  <table>
    <tr>
    <th>&nbsp;</th>
    <th>League</th>
    <th>Team Name</th>
    <th>Final Score</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <!-- make team & league ajax filled.. -->
    <% leagues = League.find(:all, :order => "name ASC") %>
    <% teams = Team.find(:all, :order => "name ASC") %>

        <!-- ## ToolTip: Enter the home or first team's name here (e.g. Rain of Terror) --> </td>
    <td><%= collection_select :leagueA, nil, leagues, :id, :name %></td>
        <!-- ## ToolTip: Enter the home or first team's name here (e.g. Rain of Terror) --> </td>
    <td><%= collection_select :teamA, nil, teams, :id, :name %></td>
    <td><%= text_field_tag :scoreA, nil, :size => 5, :max_length => 5 %></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td><%= collection_select :leagueB, nil, leagues, :id, :name %></td>
    <td><%= collection_select :teamB, nil, teams, :id, :name %></td>
    <td><%= text_field_tag :scoreB, nil, :size => 5, :max_length => 5 %></td>
    </tr>
  </table>

  <p>
    <%= f.submit "Create" %>
  </p>
<% end %>

<%= link_to 'Back', events_submitters_path %>

<!-- vi:ts=2:et:sw=2:
-->
